Number Functions

Numbers have some useful functions associated with them.

round(number, places)


In [9]:
round(6.022, 1)


Out[9]:
6.0

abs(num)


In [10]:
abs(-3.0)


Out[10]:
3.0

bin(num)


In [11]:
bin(16)


Out[11]:
'0b10000'